import cn.edu.zut.cs.Model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;

import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotNull;

@ContextConfiguration("classpath*:javaserver-context.xml")
public class Springtest extends AbstractTestNGSpringContextTests {


    @Autowired
    Student student;
    @Test
    public void beantest() {
        assertTrue(student!=null);
        assertNotNull(student);
    }

}